package com.lagou.module01.service.imp;

import com.lagou.module01.bean.User;
import com.lagou.module01.dao.UserDao;
import com.lagou.module01.factory.DaoFactory;
import com.lagou.module01.service.UserService;

/**
 * @Author: xyk
 * @Date: Create in 21:31 2021/3/14
 * @Description:
 */
public class UserServiceImp implements UserService {
    // 自定义成员变量用户数据访问对象
    private UserDao userDao;

    /*
    构造方法初始化成员变量
     */
    public UserServiceImp() {
        this.userDao = DaoFactory.getUserDao();
    }

    @Override
    public User userLoginService(User user) {
        return userDao.userLogin(user);
    }
}
